package com.xupt.dangjian.util;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.xupt.dangjian.entity.User;

public class TokenUtil {
    public static String getToken(User user) {
        String token="";
        token= JWT.create().withAudience( user.getId()+"" )
                .sign( Algorithm.HMAC256(user.getPassword()));
        return token;
    }

}
